<!DOCTYPE html>
<html lang="en">
<head>
    <title>区域报表详情页</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <script src="https://file.ggxqce.com/web/vue.min.js"></script>
</head>
<style>
    [v-cloak] {
        display: none;
    }

    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        font-size: 12px;
    }

    body {
        margin: 1px;
        background: #f8f8f8;
    }

    .boxBoy {
        background: #fff;
    }

    table {
        border-spacing: 0;
        border-collapse: collapse;
        display: table;
    }

    .weather {
        text-align: center;
        font-size: 16px;
        position: absolute;
        top: 5px;
        line-height: 30px;
        float: left;
    }

    th {
        font-weight: normal;
    }

    table.text-center, table.text-center td, table.text-center th {
        text-align: center;
        font-size: 12px;
    }

    .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
        border: 1px solid #cbcbcd;
        height: 28px;
        position: relative;
        color: #2a8cec;
        padding: 0 4px;
    }

    table th {
        background: #f8f8f8;
    }

    .table-bordered {
        border: 1px solid #cbcbcd;
    }

    .table {
        width: 100%;
        max-width: 100%;
    }

    .hidden {
        display: none;
    }

    .lineOne, .lineTwo {
        text-align: left;
    }

    .tdColor {
        background-color: #f8f8f8;
        font-weight: normal;
        color: #333 !important;
    }

    .lineOne span {
        max-height: 24px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        text-align: left;
    }

    .lineTwo span {
        max-height: 55px;
        line-height: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        text-align: left;
        padding: 5px;

    }

    .div-td-content-more {
        position: absolute;
        height: auto;
        z-index: 999;
        line-height: 20px;
        background-color: #d3e8fd;
        padding: 8px 6px;
        border: 1px solid #e8e8ea;
        display: none;
    }

    .div-td-content-more i {
        width: 15px;
        height: 12px;
        background: url("/dist/img/more-icon.png");
        position: absolute;
        left: 50px;
        top: -12px;
    }

    .clear {
        clear: both
    }

    .boxItem {
        width: 100%;
        padding: 10px;
        padding-top: 5px;
        padding-bottom: 0;
        background: inherit;
        background-color: rgba(255, 255, 255, 1);
        border: none;
        position: relative;
    }

    .boxItemTitle {
        color: #2c8cec;
        font-size: 22px;
        font-weight: bold;
        margin-bottom: 6px;
        text-align: center;
    }

    .home {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 10px;
        height: 14px;
        line-height: 14px;
        text-align: center;
    }

    .dian-icon {
        background: url("/dist/img/dian.png") no-repeat;
        background-size: cover;
        width: 14px;
        height: 14px;
        display: inline-block;
    }

    .jiaobiao, .jiaobiaoNew {
        position: relative;
    }

    .jiaobiao i {
        display: block;
        width: 0;
        height: 0;
        border-width: 0px 0 12px 12px;
        border-style: solid;
        border-color: transparent transparent transparent #2a8cec;
        position: absolute;
        top: 0px;
        left: 0px;
    }

    .jiaobiaoNew i {
        display: block;
        width: 12px;
        height: 12px;
        background: url("/dist/img/newLog2.png");
        background-size: 100% 100%;
        position: absolute;
        top: 0px;
        left: 0px;
    }

    .lineImg {
        padding-top: 5px !important;
        padding-bottom: 10px !important;
    }

    .lineImg img {
        height: 45px;
        width: 45px;
        float: left;
        margin: 10px;
        object-fit: cover;
    }

    .newCustomer {
        background: url(/dist/img/new.png) no-repeat;
        background-size: cover;
        width: 20px;
        height: 20px;
        right: 0;
        top: 2px;
        position: absolute;
    }

    .wajueji {
        padding-left: 140px;
        background: url("/dist/img/wajueji.png") no-repeat;
        background-size: 120px 88px;
        height: 88px;
        line-height: 88px;
        color: red;
        font-size: 14px;
        font-weight: bold;
        margin-left: 50px;
    }

    .qipao {
        /*background: url(/dist/img/qipao.png);*/
        background-size: 100% 100%;
        height: 88px;
        /* padding: 0 20px; */
        padding-left: 20px;
        /*padding-right: 20px;*/
        color: red;
        line-height: 88px;
        float: left;
        font-size: 14px;
        font-weight: bold;
    }

    .plan1 {
        background: url("/dist/img/plan1.png") no-repeat center center;
        background-size: 100%;
    }

    .plan2 {
        background: url("/dist/img/plan2.png") no-repeat center center;
        background-size: 100%;
    }

    .plan3 {
        background: url("/dist/img/plan3.png") no-repeat center center;
        background-size: 100%;
    }

    .boxItemTitleNotice {
        color: red;
        font-size: 22px;
        font-weight: bold;
        margin-bottom: 10px;
        text-align: center;
    }

    .boxItemTitleNotice i {
        background: url("/dist/img/jg.png") no-repeat center center;
        height: 22px;
        width: 22px;
        background-size: cover;
        display: inline-block;
        margin-bottom: -3px;
        margin-left: 5px;
    }

    .boxItemTitleNoticeTime {
        color: red;
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;
        text-align: center;
    }

    .boxItemTitleNoticeTime i {
        background: url("/dist/img/jg.png") no-repeat center center;
        height: 16px;
        width: 16px;
        background-size: cover;
        display: inline-block;
        margin-bottom: -3px;
        margin-left: 5px;
    }

    .search-button {
        width: 14px;
        height: 14px;
        background-image: url(/dist/img/glass.jpg);
        border: 0 none;
        cursor: pointer;
        margin-top: 0px;
    }

    input[type=button] {
        outline: none;
    }

    .oaBtn {
        background: url(/dist/img/btn-bj2.png) repeat-y !important;
        background-size: 100% 100% !important;
        color: #fff !important;
    }

    .btn-group-sm > .btn, .btn-sm {
        padding: 2px 10px;
    }

    .btn {
        border-radius: 3px;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: 1px solid transparent;
    }

    .pull-right {
        float: right !important;
    }

    .blue {
        color: #39c;
    }

    .red {
        color: #e03800;
    }

    .weather img {
        height: 30px;
        width: 30px;
        float: left;
    }
    .btn-blue {
        border: none;
        background: #2a8ced;
        color: #fff;
        font-size:12px;
        height: 32px;
        width: 18%;
        border-radius: 2px;
        outline: none;
    }
    .btn-blue.focus, .btn-blue:focus, .btn-blue:hover {
        color: #fff;
        text-decoration: none;

    }
    .line{
        border-bottom: 4px solid #2a8cec;
    }
</style>
<body>
<section class="content" id="app" v-cloak>
    <div class="div-td-content-more"><i></i></div>
    <div class="templateStyle">
        <div class="boxItem">
            <div class="boxBoy" id="scrollDiv">
                <div style="height: 25px;margin: 10px 0px;">
                    <input type="text" placeholder="请输入关键字" class="form-control pull-left input-sm"
                           style="width:80%;height: 32px;vertical-align: top;border: 1px solid #cbcbcd;margin-right: 6px;padding-left: 4px;outline: none;" v-model="key">
                    <button type="button" class="btn btn-blue" @click="getList()">查询</button>
                </div>
                <div style="text-align: center">共<span>{{recordCount}}</span>条记录</div>
                <!--电访-->
                <template v-if="type == 'telCustomer'">
                    <table class="table table-bordered text-center table-width"
                           v-for="(item,i) in list">
                        <tbody>
                        <tr>
                            <td class="tdColor" style="width: 25%;border-bottom: 4px  solid #2a8cec">客户姓名</td>
                            <td>{{item.name}}</td>
                            <td class="tdColor" style="width: 25%;">客户电话</td>
                            <td style="width: 25%;">{{trims(item.tel)}}</td>
                        </tr>
                        <tr>
                            <td class="tdColor">拜访时间</td>
                            <td>
                                {{item.arrivalsTime?item.arrivalsTime:"-"}}/{{item.leaveTime?item.leaveTime:"-"}}
                            </td>
                            <td class="tdColor">拜访时长</td>
                            <td>{{item.time}}分</td>
                        </tr>
                        <tr>
                            <td class="tdColor">基本情况</td>
                            <td colspan="3" class="lineTwo"><span>{{item.otherCondition}}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </template>
                <!--大区电访-->
                <template v-if="type == 'tel2Customer'">
                    <table class="table table-bordered text-center table-width"
                           v-for="(item,i) in list">
                        <tbody>
                        <tr>
                            <td class="tdColor" style="width: 25%;border-bottom: 4px  solid #2a8cec">客户姓名</td>
                            <td>{{item.customerName}}</td>
                            <td class="tdColor" style="width: 25%;">客户电话</td>
                            <td style="width: 25%;">{{trims(item.customerTel)}}</td>
                        </tr>
                        <tr>
                            <td class="tdColor">拜访时间</td>
                            <td>
                                {{item.arrivalsTime? new Date(item.arrivalsTime).Format("yyyy-MM-dd hh:mm"):"-"}}/{{item.leaveTime? new Date(item.leaveTime).Format("hh:mm"):"-"}}
                            </td>
                            <td class="tdColor">拜访时长</td>
                            <td>{{item.time}}分</td>
                        </tr>
                        <tr>
                            <td class="tdColor">基本情况</td>
                            <td colspan="3" class="lineTwo"><span>{{item.otherCondition}}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </template>
                <!--面访-->
                <template v-else-if="type=='faceCustomer'">
                    <table class="table table-bordered text-center table-width"
                           v-for="(item,i) in list">
                        <tbody>
                        <tr>
                            <td class="tdColor" style="width: 25%;border-bottom: 4px  solid #2a8cec">客户姓名</td>
                            <td>{{item.name}}</td>
                            <td class="tdColor" style="width: 25%;">客户电话</td>
                            <td style="width: 25%;">{{trims(item.tel)}}</td>
                        </tr>
                        <tr>
                            <td class="tdColor">客户微信</td>
                            <td>{{trims(item.wechat)}}</span></td>
                            <td class="tdColor">陪同人员</td>
                            <td>{{item.entourage}}</span></td>
                        </tr>
                        <tr>
                            <td class="tdColor">客户类型</td>
                            <td>{{item.customerType}}</td>
                            <td class="tdColor">客户信用</td>
                            <td>{{item.customerCredit}}</td>
                        </tr>
                        <tr>
                            <td class="tdColor">拜访时间</td>
                            <td>
                                {{item.arrivalsTime?item.arrivalsTime:"-"}}/{{item.leaveTime?item.leaveTime:"-"}}
                            </td>
                            <td class="tdColor">拜访时长</td>
                            <td>{{item.time}}分</td>
                        </tr>
                        <tr>
                            <td class="tdColor">基本情况</td>
                            <td colspan="3" class="lineTwo"><span>{{item.otherCondition}}</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="tdColor">图片</td>
                            <td class="lineImg" colspan="3">
                                <div v-if="item.arrivalsImg"
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img v-if="item.arrivalsImg" :src="item.arrivalsImg"
                                         @click="openImg(item.arrivalsImg)" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">签到</span>
                                </div>
                                <div v-else
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img src="/dist/img/zwImg.png" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">未签到</span>
                                </div>
                                <div v-if="item.leaveImg"
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img v-if="item.leaveImg" :src="item.leaveImg"
                                         @click="openImg(item.leaveImg)" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">签退</span>
                                </div>
                                <div v-else
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img src="/dist/img/zwImg.png" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">未签退</span>
                                </div>
                            </td>

                        </tr>

                        </tbody>
                    </table>
                </template>
                <!--新增/全部客户-->
                <template v-else>
                    <table class="table table-bordered text-center table-width"
                           v-for="(item,i) in list">
                        <tbody>
                        <tr>
                            <td class="tdColor" style="width: 25%;border-bottom: 4px  solid #2a8cec">客户姓名</td>
                            <td>{{item.customerName}}</td>
                            <td class="tdColor" style="width: 25%;">客户电话</td>
                            <td style="width: 25%;">{{trims(item.customerTel)}}</td>
                        </tr>
                        <template v-if="item.arrivalsImg||item.leaveImg">
                        <tr>
                            <td class="tdColor">客户微信</td>
                            <td>{{trims(item.customerWechat)}}</span></td>
                            <td class="tdColor">陪同人员</td>
                            <td>{{item.entourageName}}</span></td>
                        </tr>
                        <tr>
                            <td class="tdColor">客户类型</td>
                            <td>{{item.customerType}}</td>
                            <td class="tdColor">客户信用</td>
                            <td>{{item.customerCredit}}</td>
                        </tr>
                        </template>
                        <tr>
                            <td class="tdColor">拜访时间</td>
                            <td>
                                {{item.arrivalsTime? new Date(item.arrivalsTime).Format("yyyy-MM-dd hh:mm"):"-"}}/{{item.leaveTime? new Date(item.leaveTime).Format("hh:mm"):"-"}}
                            </td>
                            <td class="tdColor">拜访时长</td>
                            <td>{{item.time}}分</td>
                        </tr>
                        <tr>
                            <td class="tdColor">基本情况</td>
                            <td colspan="3" class="lineTwo"><span>{{item.otherCondition}}</span>
                            </td>
                        </tr>
                        <template v-if="item.arrivalsImg||item.leaveImg">
                        <tr>
                            <td class="tdColor">图片</td>
                            <td class="lineImg" colspan="3">
                                <div v-if="item.arrivalsImg"
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img v-if="item.arrivalsImg" :src="item.arrivalsImg"
                                         @click="openImg(item.arrivalsImg)" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">签到</span>
                                </div>
                                <div v-else
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img src="/dist/img/zwImg.png" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">未签到</span>
                                </div>
                                <div v-if="item.leaveImg"
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img v-if="item.leaveImg" :src="item.leaveImg"
                                         @click="openImg(item.leaveImg)" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">签退</span>
                                </div>
                                <div v-else
                                     style="border: 1px solid #cbcbcd;width: 45px;height: 45px;float: left;margin: 0 10px 10px 0;">
                                    <img src="/dist/img/zwImg.png" style="margin: 0;">
                                    <span style="margin-top: 5px;margin-bottom:5px;color: #797878;">未签退</span>
                                </div>
                            </td>

                        </tr>
                        </template>

                        </tbody>
                    </table>
                </template>
            </div>
            <div class="clear"></div>
        </div>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="/dist/plugins/scroll/myScroll.js"></script>
<!--框架已定义 JS-->
<!--oa自定义  JS-->
<script src="/dist/js/oaApp.js"></script>

<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script>
    $(function () {
        $("body").on("click", ".lineOne,.lineTwo", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script>
    $.ajaxSetup({
        global: true,
        type: "POST",
        cache: false,
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        beforeSend: function () {
        },
        complete: function () {

        },
        error: function (e) {
            alert('error' + e.responseText);
        }
    });
    $.extend($.wyui, {
        page: {
            urlParams: null,
            queryParams: {
                requestPage: 1,
                pageSize: 10
            },
            dataUrl: '',
            createQueryParams: function () {
            },
            getByPage: function (type) {
                if (type == "scroll") {
                    $.wyui.page.queryParams.requestPage++;
                }
                $.ajax({
                    url: $.wyui.page.dataUrl,
                    data: JSON.stringify($.wyui.page.queryParams),
                    beforeSend: function () {

                    },
                    complete: function () {
                    },
                    success: function (r) {
                        // $("#allCount").html(r.data.sendData.pager.recordCount);
                        // $("#nowPage").html($.wyui.page.queryParams.requestPage);
                        if (r.data.sendData.pager && r.data.sendData.pager.pageCount == 0) {
                            r.data.sendData.pager.pageCount = 1;
                        }
                        // $("#allPage").html(r.data.sendData.pager.pageCount);
                        if (type == "scroll") {
                            $.wyui.page.getByPage_scroll_callback(r.data.sendData.records);
                        } else {
                            //$.wyui.page.getByPage_callback_new(r.data.sendData.records);
                            if ($.wyui.page.getByPage_callback_new) {
                                $.wyui.page.getByPage_callback_new(r.data.sendData);
                            }
                        }

                    }
                });
            }
        },
        postMethod: function (url, data, callback, sync, id) {
            if (!id) {
                id = "#app"
            }
            $.ajax({
                url: server.ip + url,
                async: sync ? false : true,
                data: JSON.stringify(data),
                beforeSend: function () {

                },
                complete: function () {
                    setTimeout(function () {
                    }, 1000);

                },
                success: function (r) {
                    if (!r.e.code) {
                        callback(r.data.sendData);
                    } else {
                        alert(r.e.desc);
                    }
                },
                error: function (e) {
                    alert(url + e.responseText);
                }
            });
        },
    });
</script>
<script type="text/javascript">
    function refresh() {
        $.wyui.page.queryParams.requestPage = 1;
        $.wyui.page.getByPage();
    }

    var app = new Vue({
        el: "#app",
        data: {
            userId: getUrlParamObj().userId,
            dateTime: getUrlParamObj().dateTime,
            today: getUrlParamObj().today,
            type: getUrlParamObj().type,
            state: getUrlParamObj().state,
            list: [],
            recordCount: 0,
            key: '',
        },
        methods: {
            //去空格
            trims: function (data) {
                if (data) {
                    var data = data.replace(/[ ]/g, "");
                }
                return data;
            },
            //app打开图片
            openImg: function (url, index) {
                if (!index) {
                    index = 0
                }
                var obj = {
                    type: 'img',
                    imgList: url,
                    position: index,
                }
                prompt(JSON.stringify(obj))
            },
            //获取总数量
            get_totalNum: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.newReportForm.getAllCustomerForRM, {
                    "userId": that.userId,
                    "dateTime": that.dateTime,
                    "requestPage": 1,
                    "pageSize": 10
                }, function (data) {
                    console.log(data.records)
                    that.list = data.records;
                    that.recordCount = data.pager.recordCount;
                });
            },
            //获取本月新增
            get_monthNum: function () {
                var that = this;
                $.wyui.postMethod(urlConfig.newReportForm.getNewCustomerForRM, {
                    "userId": that.userId,
                    "dateTime": that.dateTime,
                    "requestPage": 1,
                    "pageSize": 10
                }, function (data) {
                    console.log(data.records)
                    that.list = data.records;
                    that.recordCount = data.pager.recordCount;
                });
            },
            //获取面访/电访
            get_faceTelList: function (type) {
                var that = this;
                $.wyui.postMethod(urlConfig.report.visitCustomer.getPeopleByUserId, {
                    "userId": that.userId,
                    "dateTime": that.today,
                    "type": type,
                    "today": that.dateTime
                }, function (data) {
                    console.log(data.records)
                    that.list = data.records;
                    that.recordCount = data.pager.recordCount;
                });
            },
//            //查询
            getList: function () {
                var that = this;
                var obj = {
                    dialog : 'show'
                }
                prompt(JSON.stringify(obj))
//                that.type = 'faceCustomer';
                $.wyui.page.queryParams.key=$.trim(that.key)
                $.wyui.page.getByPage();
            },
        },
        mounted: function () {
            var that = this;
            var obj = {
                dialog : 'show'
            }
            prompt(JSON.stringify(obj))
            if (that.type == "newCustomer") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    type:that.state,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newReportForm.getNewCustomerForRM;
            }else if (that.type == "monthNewCustomer") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getNewCustomerForRM;
            }
            else if (that.type == "allCustomer2") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getAllCustomerForRM;
            }
            else if (that.type == "allCustomer") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    type:that.state,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newReportForm.getAllCustomerForRM;
            }
            else if (that.type == "run") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.daQuVisitByUserId;
            }
            else if (that.type == "withMonth") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    type:0,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getIntentCustomerForMonth;
            }
            else if (that.type == "moreMonth") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    requestPage: 1,
                    pageSize: 10,
                    type:1,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getIntentCustomerForMonth;
            }
            else if (that.type == "telCustomer") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    type: 0,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getVisitPeopleByUserIdAndDateTime;
            } else if (that.type == "faceCustomer") {
                $.extend($.wyui.page.queryParams, {
                    userId: that.userId,
                    dateTime: that.dateTime,
                    type: 1,
                    key:$.trim(that.key)
                });
                $.wyui.page.dataUrl = server.ip + urlConfig.newDaQuReportForm.getVisitPeopleByUserIdAndDateTime;
            }
//        $.wyui.page.queryParams.pageType = $.wyui.page.urlParams.pageType;
            $.wyui.page.getByPage_callback_new = function (sendData) {
                console.log(sendData)
                console.log(that.type)
                if (that.type == "telCustomer") {
                    if(sendData.telTargetDay){
                        app.list = sendData.telTargetDay;
                        app.recordCount = sendData.telTargetInfo.complete;
                    }else if(sendData.pager){
                        if(sendData.records&&sendData.records[0].customerName){
                            that.type='tel2Customer'
                        }
                        app.list = sendData.records;
                        app.recordCount = sendData.pager.recordCount;
                    }
                } else if (that.type == "faceCustomer") {
                    if(sendData.faceTargetInfo){
                        app.list = sendData.faceTargetDay;
                        app.recordCount = sendData.faceTargetInfo.complete;
                    }else if(sendData.pager){
                        if(sendData.records&&sendData.records[0].customerName){
                            that.type='allCustomer'
                        }
                        app.list = sendData.records;
                        app.recordCount = sendData.pager.recordCount;
                    }
                }
                else {
                    app.list = sendData.records;
                    app.recordCount = sendData.pager.recordCount;
                }
                document.getElementById("scrollDiv").scrollTop = 0;
                var obj = {
                    dialog : 'hidden'
                }
                prompt(JSON.stringify(obj))
            };
            $.wyui.page.getByPage_scroll_callback = function (list) {
                console.log(list)
                if (list.length < 10) {
                    isLoad = false;
                    for (var i = 0; i < list.length; i++) {
                        app.list.push(list[i]);
                    }
                } else {
                    for (var i = 0; i < list.length; i++) {
                        app.list.push(list[i]);
                    }
                    isLoad = true;
                }
            }
            $.wyui.page.getByPage()
        }

    })
    $(function () {
        $("#customerName").autoComplete({
            url: server.ip + urlConfig.thursday.getNameAndTel,
            render: function (users, panel) {
                console.log("users=" + users);
                if (users) {
                    for (var i = 0; i < users.length; i++) {
                        $("<li></li>").data("autoComplete",
                            users[i]).html("<a>" + users[i].customerName + "&nbsp;&nbsp;&nbsp;" +
                            "(" + "&nbsp;" + users[i].customerTel + ") " + "</a>")
                            .appendTo(panel);
                    }
                }
            },
            selected: function (user) {
                app.list.customerId = user.customerId;
                app.list.customerName = user.customerName;
                app.list.customerTel = user.customerTel;
                return false;
            },
            extraParams: {createUserId: app.userId},
            height: 210,
            width: 300
        });
    });
</script>
<script>
    /************************滚动加载******************************/
    var isLoad = true;

    $(window).scroll(function () {
        // scroll at bottom
        //console.log($(window).scrollTop() + $(window).height(), $(document).height())
        if ($(window).scrollTop() + $(window).height() == $(document).height()) {
            if (isLoad) {
                isLoad = false;
                setTimeout($.wyui.page.getByPage("scroll"), 1000);
            }
            // load data
        }
    });
</script>
</body>
</html>